package hello

import "fmt"

func main() {
	// 实现了对应的方法即认为是某个接口的子类
	var p = Person{
		"zhangsan", "nan",
	}
	p.Jump()
	p.Catch()
}

type Person struct {
	name  string
	gener string
}

type Action interface {
	Jump()
	Catch()
}

func (p Person) Jump() {
	fmt.Println("jump time")
	fmt.Println("i'm " + p.name)
	fmt.Println()
}

func (p Person) Catch() {
	fmt.Println("catch the cat")
	fmt.Printf("i'm %q", p.name)
	fmt.Printf("%s", "Go语言")
	fmt.Println()
}
